from ast import Dict

from torch import TreeView
from views.common.translator import Translator
from views.template_page_view import BasePageTemplateView
from PyQt6.QtWidgets import (
    QHBoxLayout,
)

class StrategyGroupView(BasePageTemplateView):
    """Scroll interface"""

    def __init__(self, parent=None):
        t = Translator()
        super().__init__("StrategyGroupView", parent=parent)

    def doInitAndUpdate(self):
        self.hBoxLayout = QHBoxLayout(self)
        self.setStyleSheet("Demo{background:rgb(255,255,255)}")
        # setTheme(Theme.DARK)

        self.view = TreeView(self)
        model = QFileSystemModel()
        model.setRootPath('.')
        self.view.setModel(model)

        self.view.setBorderVisible(True)
        self.view.setBorderRadius(8)

        self.hBoxLayout.addWidget(self.view)
        self.hBoxLayout.setContentsMargins(50, 30, 50, 30)
        self.resize(800, 660)

    
    def getBaseParam(self) -> Dict[str, str]:
        return {"stockCode": "100001"}